﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfScratchApp
{
    /// <summary>
    /// Interaction logic for DataTemplateExample.xaml
    /// </summary>
    public partial class DataTemplateExample : Window
    {
        public DataTemplateExample()
        {
            InitializeComponent();
            var fileNames = Directory.GetFiles(@"C:\public\photos\scuba\selected", "*jpg");
            var photos = new Photos();
            foreach (var fileName in fileNames)
            {
                photos.Add(new Photo(fileName));
            }
            this.DataContext = photos;
        }
    }
}
